// SelSpringMode.h: interface for the SelSpringMode class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_SELSPRINGMODE_H__0E81FFDF_9955_4E25_8040_9F2E6CAD40D8__INCLUDED_)
#define AFX_SELSPRINGMODE_H__0E81FFDF_9955_4E25_8040_9F2E6CAD40D8__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "Spring.h"
#include "Part.h"

class SelSpringMode  
{
public:
	SelSpringMode();
	virtual ~SelSpringMode();

	void WorkLoad(DOUBLE dbWorkLoad){
		m_dbWorkLoad = dbWorkLoad;
	}

	void HotDisplacement(DOUBLE dbDis){
		m_dbHotDisplacement = dbDis;
	}

	void LoadChangeCoefficient(DOUBLE dbCoefficient){
		m_dbLoadChangeCoefficient = dbCoefficient;
	}

	void SetOwner(Part* pPart){
		m_pPart = pPart;
	}

	Part* GetOwner(){
		return m_pPart;
	}

public:
	virtual Spring* GetSpring() = 0;

protected:
	BOOL CanInSerial(Spring* pSpring);

	DOUBLE LoadChangeCoefficient(){
		return m_dbLoadChangeCoefficient;
	}

	DOUBLE HotDisplacement(){
		return m_dbHotDisplacement;
	}

	DOUBLE WorkLoad(){
		return m_dbWorkLoad;
	}

private:
	DOUBLE m_dbWorkLoad;
	DOUBLE m_dbHotDisplacement;
	DOUBLE m_dbLoadChangeCoefficient;
	Part* m_pPart;
};

#endif // !defined(AFX_SELSPRINGMODE_H__0E81FFDF_9955_4E25_8040_9F2E6CAD40D8__INCLUDED_)
